home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / clang / cweb31.zip / MAKEFILE < prev    next >
Text File  |  1993-06-11  |  4KB  |  178 lines

  1. # This file is part of CWEB.
  2. # It is distributed WITHOUT ANY WARRANTY, express or implied.
  3. # Version 3.0 --- June 1993
  4.  
  5. # Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
  6.  
  7. # Permission is granted to make and distribute verbatim copies of this
  8. # document provided that the copyright notice and this permission notice
  9. # are preserved on all copies.
  10.  
  11. # Permission is granted to copy and distribute modified versions of this
  12. # document under the conditions for verbatim copying, provided that the
  13. # entire resulting derived work is distributed under the terms of a
  14. # permission notice identical to this one.
  15.  
  16. # Read the README file, then edit this file to reflect local conditions
  17. #
  18.  
  19. # directory for TeX inputs (cwebmac.tex goes here)
  20. MACROSDIR= /usr/local/lib/tex/inputs
  21.  
  22. # directory for CWEB inputs in @i files
  23. CWEBINPUTS= /usr/local/lib/cweb
  24.  
  25. # extension for manual pages ("l" distinguishes local from system stuff)
  26. MANEXT= l
  27. #MANEXT= 1
  28.  
  29. # directory for manual pages (cweb.1 goes here)
  30. MANDIR= /usr/man/man$(MANEXT)
  31.  
  32. # destination directory for executables; must end in /
  33. DESTDIR= /usr/local/bin/
  34.  
  35. # directory for GNU EMACS Lisp code (cweb.el goes here)
  36. EMACSDIR= /usr/local/emacs/lisp
  37.  
  38. # Set DESTPREF to null if you want to call the executables "tangle" and "weave"
  39. # (probably NOT a good idea; we recommend leaving DESTPREF=c)
  40. DESTPREF=c
  41.  
  42. # Set CCHANGES to comm-foo.ch if you need changes to common.w
  43. CCHANGES=
  44.  
  45. # Set TCHANGES to ctang-foo.ch if you need changes to ctangle.w
  46. TCHANGES=
  47.  
  48. # Set WCHANGES to cweav-foo.ch if you need changes to cweave.w
  49. WCHANGES=
  50.  
  51. # We keep debugging info around, for fun, but most users don't need it
  52. CFLAGS = -g
  53. #CFLAGS = -O
  54. LINKFLAGS = -g
  55. #LINKFLAGS = -s # for smaller (stripped) executables on many UNIX systems
  56.  
  57. # What C compiler are you using?
  58. CC = cc
  59.  
  60. # RM and CP are used below in case rm and cp are aliased
  61. RM= /bin/rm
  62. CP= /bin/cp
  63.  
  64. ##########  You shouldn't have to change anything after this point #######
  65.  
  66. CWEAVE = ./cweave
  67. CTANGLE = ./ctangle
  68. SOURCES = cweave.w common.w ctangle.w
  69. ALMOSTALL =  common.w ctangle.w Makefile README common.c common.h ctangle.c \
  70.     cwebman.tex cwebmac.tex examples comm-vms.ch ctang-vms.ch \
  71.     cweav-vms.ch comm-man.ch ctang-man.ch cweav-man.ch \
  72.     comm-pc.ch ctang-pc.ch cweav-pc.ch comm-amiga.ch \
  73.     cweb.1 cweb.el prod.w
  74. ALL =  $(ALMOSTALL) cweave.w
  75.  
  76. .SUFFIXES: .dvi .tex .w
  77.  
  78. .w.tex:
  79.     $(CWEAVE) $*
  80.  
  81. .tex.dvi:    
  82.     tex $<
  83.  
  84. .w.dvi:
  85.     make $*.tex
  86.     make $*.dvi
  87.  
  88. .w.c:
  89.     $(CTANGLE) $*
  90.  
  91. .w.o:
  92.     make $*.c
  93.     make $*.o
  94.  
  95. all: ctangle cweave
  96.  
  97. cautiously: ctangle
  98.     $(CP) common.c SAVEcommon.c
  99.     ./ctangle common $(CCHANGES)
  100.     diff common.c SAVEcommon.c
  101.     $(RM) SAVEcommon.c
  102.     $(CP) ctangle.c SAVEctangle.c
  103.     ./ctangle ctangle $(TCHANGES)
  104.     diff ctangle.c SAVEctangle.c
  105.     $(RM) SAVEctangle.c
  106.  
  107. SAVEctangle.c:
  108.     $(CP) ctangle.c SAVEctangle.c
  109.  
  110. SAVEcommon.c:
  111.     $(CP) common.c SAVEcommon.c
  112.  
  113. common.c: common.w $(CCHANGES)
  114.     $(CTANGLE) common $(CCHANGES)
  115.  
  116. common.o: common.c
  117.     $(CC) $(CFLAGS) -DCWEBINPUTS=\"$(CWEBINPUTS)\" -c common.c
  118.  
  119. ctangle: ctangle.o common.o
  120.     $(CC) $(LINKFLAGS) -o ctangle ctangle.o common.o 
  121.  
  122. ctangle.c: ctangle.w $(TCHANGES)
  123.     $(CTANGLE) ctangle $(TCHANGES)
  124.  
  125. cweave: cweave.o common.o
  126.     $(CC) $(LINKFLAGS) -o cweave cweave.o common.o
  127.  
  128. cweave.c: cweave.w $(WCHANGES)
  129.     $(CTANGLE) cweave $(WCHANGES)
  130.  
  131. doc: $(SOURCES:.w=.dvi)
  132.  
  133. usermanual: cwebman.tex cwebmac.tex
  134.     tex cwebman
  135.  
  136. fullmanual: usermanual $(SOURCES) comm-man.ch ctang-man.ch cweav-man.ch
  137.     make cweave
  138.     ./cweave common.w comm-man.ch
  139.     tex common.tex
  140.     ./cweave ctangle.w ctang-man.ch
  141.     tex ctangle.tex
  142.     ./cweave cweave.w cweav-man.ch
  143.     tex cweave.tex
  144.  
  145. # be sure to leave ctangle.c and common.c for bootstrapping
  146. clean:
  147.     $(RM) -f -r *~ *.o common.tex cweave.tex cweave.c ctangle.tex \
  148.       *.log *.dvi *.toc *.idx *.scn core cweave.w.[12] cweave ctangle
  149.  
  150. install: all
  151.     $(CP) cweave $(DESTDIR)$(DESTPREF)weave
  152.     chmod 755 $(DESTDIR)$(DESTPREF)weave
  153.     $(CP) ctangle $(DESTDIR)$(DESTPREF)tangle
  154.     chmod 755 $(DESTDIR)$(DESTPREF)tangle
  155.     $(CP) cweb.1 $(MANDIR)/cweb.$(MANEXT)
  156.     chmod 644 $(MANDIR)/cweb.$(MANEXT)
  157.     $(CP) cwebmac.tex $(MACROSDIR)
  158.     chmod 644 $(MACROSDIR)/cwebmac.tex
  159.     $(CP) cweb.el $(EMACSDIR)
  160.     chmod 644 $(EMACSDIR)/cweb.el
  161.  
  162. bundle: $(ALL)
  163.     sed -n '1,2200 p' cweave.w > cweave.w.1
  164.     sed -n '2201,$$ p' cweave.w > cweave.w.2
  165.     /usr/local/bin/shar -m100000 -c -v -f cweb $(ALMOSTALL) cweave.w.[12]
  166.  
  167. tags: $(ALL)
  168.     etags -z $(ALL)
  169.  
  170. cweb.tar: $(ALL)
  171.     tar cvhf cweb.tar $(ALL)
  172.  
  173. floppy: $(ALL)
  174.     bar cvhf /dev/rfd0 $(ALL)
  175.     bar tvf /dev/rfd0
  176.     eject
  177.